#pragma once


/*
IObject
Baseclass for all gameobjects
*/
class IObject
{
private:
	int m_nReferenceCount;
protected:
	 static std::list<IObject*> *m_pInstances;
public:

	IObject();
	~IObject();

	static void ClearAll()
	{
		std::list<IObject*>::iterator it = m_pInstances->begin();

		while (it != m_pInstances->end())
		{
			//if ((*it)->m_nReferenceCount > 0)
				delete(*it);

			++it;
		}
		delete (m_pInstances);
	}
};

